package com.one.common.common.order.binder;

import android.support.annotation.NonNull;

import com.one.common.R;
import com.one.common.common.order.MaterialStateItem;
import com.one.common.view.multitytype.adapter.BaseItemBinder;
import com.one.common.view.multitytype.adapter.BaseViewHolderMulti;

/**
 * creator: zhulunjun
 * time:    2018/8/9
 * describe: 收费，免费项
 */
public class MaterialStateBinder extends BaseItemBinder<MaterialStateItem> {
    public MaterialStateBinder() {
        super(R.layout.item_material_state);
    }

    @Override
    protected void bindView(@NonNull BaseViewHolderMulti holder, @NonNull MaterialStateItem item) {
        if(item.isFree()) {
            holder.setText(R.id.tv_state, "维修清单-免费项");
        } else {
            holder.setText(R.id.tv_state, "维修清单-收费项");
        }
    }
}
